<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<head>
	<%@ include file="/common/taglibs.jsp"%>
		<title>修改公司资料</title>
	<%@ include file="/common/meta.jsp"%>
	<link href="${ctx}/assets/plugins/font-awesome-4.1.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
	<link href="${ctx}/assets/css/fileUploader.css" rel="stylesheet" type="text/css" />
	<link href="${ctx}/assets/plugins/select2/select2.css" rel="stylesheet" />
	<link rel="stylesheet" href="${ctx}/assets/ztree/css/selectTree.css" type="text/css">
	<link rel="stylesheet" href="${ctx}/assets/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css" />
	<style type="text/css">
				.div_file_css{float: left;display: inline;margin-right: 10px;width: 80px;height: 80px;position: relative;}
				.div_file_css input{position: absolute;left: 0px;top: 0px;width: 100%;height: 100%;opacity: 0;filter: alpha(opacity=0);cursor: pointer;}
				.div_file_css img{float: left;display: inline;width: 100%;height: 100%;}
		</style>
</head>
<body>
     <!-- begin #page-loader -->
	<div id="page-loader" class="fade in"><span class="spinner"></span></div>
	<!-- end #page-loader -->
	
    <div id="page-container" class="fade page-sidebar-fixed page-header-fixed">
	
		<%@ include file="/common/header.jsp"%>
		<%@ include file="/common/slider.jsp"%>
		<div id="content" class="content">
		    <!-- BEGIN CONTENT HEADER-->
		    <ol class="breadcrumb pull-right">
				<li><a href="javascript:;"><fmt:message key="sys.healthcervix"/></a></li>
				<li><a href="javascript:;">账号信息维护</a></li>
				<li class="active">修改公司资料</li>
			</ol>
			<h1 class="page-header">
				修改公司资料  <!-- <small><fmt:message key="sys.healthcervix"/></small> -->
			</h1>
			
			<div class="row">
				<div class="col-md-12">
					<div class="panel panel-inverse">
						<div class="panel-body">
							<form id="addForm" name="addForm" action="#" class="form-horizontal">
		                    	<input type="hidden" name="id" id="id" value="${office.id}"/>
								<input type="hidden" name="type" id="type" value="${office.type}"/>
								<div class="form-group">
						            <label class="col-md-3 control-label ui-sortable">公司名称<span class="required">*</span></label>
						            <div class="col-md-9 ui-sortable">
						 				<input type="text" name="name" id="name" class="form-control" value="${office.name}" placeholder="请输入公司名称" maxlength="50" style="width: 50%"/>
						   		 	</div>
						       	</div>							
								<div class="form-group">
						            <label class="col-md-3 control-label ui-sortable">三证代码<span class="required">*</span></label>
						            <div class="col-md-9 ui-sortable">
						 				<input type="text" name="code" id="code" class="form-control" value="${office.code}" placeholder="请输入三证代码" maxlength="50" style="width: 50%"/>
						   		 	</div>
						       	</div>
								<div class="form-group">
						            <label class="col-md-3 control-label ui-sortable">法人代表<span class="required">*</span></label>
						            <div class="col-md-9 ui-sortable">
						 				<input type="text" name="legalPerson" id="legalPerson" class="form-control" value="${office.legalPerson}" placeholder="请输入法人代表" maxlength="50" style="width: 50%"/>
						   		 	</div>
						       	</div>		
						       	<div class="form-group">
						            <label class="col-md-3 control-label ui-sortable">企业星级<span class="required">*</span></label>
						            <div class="col-md-9 ui-sortable">
						                <input id="gardeName" name="gardeName" value="${office.gardeName}" type="text" class="form-control" style="width: 50%" readonly />
				                <%--    <select id="gardeId" name="gardeId" class="form-control" value="${office.gardeId}" style="width: 50%" readonly>
				                        	<option value="">请选择</option>
											<c:forEach var="garde" items="${gardes}">
										        <c:if test="${office.gardeId == garde.id}">
										            <option value="${garde.id}" selected="selected">${garde.gradeName}</option>
										        </c:if>
												<c:if test="${office.gardeId != garde.id}">
										            <option value="${garde.id}">${garde.gradeName}</option>
										        </c:if>
											</c:forEach>
				                        </select>--%>
				                    </div> 
						       	</div>				
						       	<div class="form-group">
						            <label class="col-md-3 control-label ui-sortable">管辖区域<span class="required">*</span></label>
						            <div class="col-md-9 ui-sortable">
						                <input type="hidden" id="officeAreaIds" name="officeAreaIds" value="${office.officeAreaIds}"/>
										<input id="officeAreaNames" name="officeAreaNames" value="${office.officeAreaNames}" type="text" class="form-control" style="width: 50%" onclick="showMenu();" readonly />
										<div id="menuContent" class="menuContent" style="display:none;" >
									        <div class="row">
										        <div class="col-md-4">
												    <input type="text" id="searchAreaName" name="searchAreaName" class="form-control" placeholder="输入查询区域名称"/>
										        </div>
										        <div class="col-md-2">
								                    <button type="button" class="btn btn-sm btn-primary" id="checkAllFalse">取消勾选</button>
									            </div>
									         </div>
	                                        <ul id="tree_1" class="ztree" style="margin-top:0; width:50%; height: 300px;"></ul>
                                        </div>
						   		 	</div>
						       	</div>	
						       	<div class="form-group">
						            <label class="col-md-3 control-label ui-sortable">注册日期<span class="required">*</span></label>
						            <div class="col-md-9 ui-sortable">
						 				<input type="text" name="registerTime" id="registerTime" value="${office.registerDate}" class="form-control" placeholder="请输入注册日期" style="width: 50%"/>
						   		 	</div>
						       	</div>	
						       	<div class="form-group">
						            <label class="col-md-3 control-label ui-sortable">注册地址<span class="required">*</span></label>
						            <div class="col-md-9 ui-sortable">
						 				<input type="text" name="registerAddress" id="registerAddress" class="form-control"  value="${office.registerAddress}" placeholder="请输入注册地址" maxlength="500" style="width: 50%"/>
						   		 	</div>
						       	</div>	
						       	
						       	<div class="form-group">
										<label class="col-md-3 control-label ui-sortable">营业执照<span class="required">*</span></label>
										<div class="col-md-5 ui-sortable">
											<div class="div_file_css">
												<input type="hidden" name="licensePic" id="licensePic" value="${office.licensePic}">
												<img id="licensePicImg" src="${ctx}/images/upload_image.png"/>
												<input type="file" id="file" name="file" onchange="ChangeManaged.uploadImg()">
											</div>
										</div>
								</div>	
								<div class="form-group">
						            <label class="col-md-3 control-label ui-sortable">联系人<span class="required">*</span></label>
						            <div class="col-md-9 ui-sortable">
						 				<input type="text" name="contactName" id="contactName" class="form-control" value="${office.contactName}" placeholder="请输入联系人" maxlength="50" style="width: 50%"/>
						   		 	</div>
						       	</div>
								<div class="form-group">
						            <label class="col-md-3 control-label ui-sortable">联系电话<span class="required">*</span></label>
						            <div class="col-md-9 ui-sortable">
						 				<input type="text" name="contactPhone" id="contactPhone" class="form-control"  value="${office.contactPhone}" placeholder="请输入联系电话" maxlength="20" style="width: 50%"/>
						   		 	</div>
						       	</div>
								<div class="form-group">
						            <label class="col-md-3 control-label ui-sortable">联系邮箱<span class="required">*</span></label>
						            <div class="col-md-9 ui-sortable">
						 				<input type="text" name="contactEmail" id="contactEmail" class="form-control"  value="${office.contactEmail}" placeholder="请输入联系邮箱" maxlength="100" style="width: 50%"/>
						   		 	</div>
						       	</div>
		                    	
		                    	<div class="form-group-bottom">
			                        <label class="col-md-3 control-label ui-sortable"></label>
			                        <div class="col-md-9 ui-sortable">
			                        	<button type="button" class="btn btn-sm btn-primary" id="editOfficeInfo">修改</button>
										<button class="btn btn-sm btn-primary" type="button" onclick="javascript:window.history.back(-1);">取消</button>
			                        </div>
		                    	</div>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<%@ include file="/common/footer.jsp" %>
	<script src="${ctx}/assets/js/jquery.dataTables.js"></script>
	<script src="${ctx}/assets/js/DT_bootstrap.js"></script>
	<script src="${ctx}/assets/js/jquery.datetimepicker.js"></script>
	<script src="${ctx}/assets/js/upload/ajaxfileupload.js"></script>
	<script src="${ctx}/js/common/date-format.js"></script>
	<script type="text/javascript" src="${ctx}/assets/ztree/js/jquery.ztree.core.js"></script>
	<script type="text/javascript" src="${ctx}/assets/ztree/js/jquery.ztree.excheck.js"></script>
	<script src="${ctx}/assets/plugins/select2/select2.min.js"></script>
	<script src="${ctx}/assets/js/i18n/zh-CN.js"></script>
	<script src="${ctx}/assets/js/select2tree.js"></script>
	<script src="${ctx}/js/common/selecttree.js"></script>
	<script type="text/javascript" src="${ctx}/js/user/changeOfficeInfo.js?v=${pVersion}"></script> 
	<!-- END PAGE LEVEL SCRIPTS -->
	<script>
	
	jQuery(document).ready(function() {       
		ChangeManaged.init();
		$("#checkAllFalse").bind("click", {type:"checkAllFalse"}, checkNode);
	});
	</script> 
	
</body>
</html>